A portion of the disclosure within this document contains material that is subject to copyright protection. The copyright owner has no objection to the reproduction of copyright protected materials by any person that is doing so within the context of this patent document as it appears in the United States Patent and Trademark Office patent file or records, but the copyright owner otherwise reserves all copyright rights whatsoever.
This invention relates to programming language debugging tools, and in particular, to an active debugging environment that is programming language neutral and host neutral for use in debugging any of a variety of disparate compiled and/or interpreted programming languages that may exist individually or in combination within a given application.
The end user of a modern software product sees and uses an application that was created by an application developer. For purposes of this discussion, an application is a computer program written in any of a plurality of programming languages. Typically, a computer program contains some original program code and certain pre-existing or xe2x80x9ccannedxe2x80x9d components that include, but are not limited to, modules, libraries, sub-routines, and function calls. The pre-existing application components are used where ever possible to limit the number of mistakes that are introduced into the application during development, and to minimize the amount of overall effort required to create the application.
As the number of applications and their components have increased, and the number of different programming languages used to generate the applications have increased, so also has the need grown for applications to expose their internal services to other applications in a consistent manner independent of the underlying programming languages involved. This need for exposing internal services of various applications in a universal manner is referred to as providing programmability.
Existing program architectural models such as the Component Object Model (COM) have greatly contributed to programmability across different applications. The COM model establishes a common paradigm for interactions and requests among different applications regardless of the programming languages or components involved. With COM, for example, an Internet web page application can be created that calls on only certain of the components of a word processing application, a spread sheet application, and a database application, that are needed to complete the web page application without including the entire bulk of each of the word processing, spread sheet, and database features within the web page application.
However, one problem that results from creating an application that includes multiple program components from many different programming language sources, is debugging. A first and third program component in an application may have originated from two different compiled language sources and a second and fourth program component in an application may have originated from two different interpretive language sources. Not only is there historically a fundamental difference in the implementation of a debugger for a compiled programming language versus an interpreted programming language, each programming language can have its own proprietary interfaces and other features that make debugging the aggregate application a difficult and/or impossible task.
For purposes of this document, a compiled programming language is considered a native machine code compilable programming language having a specific target platform. Examples of compiled programming languages include, but are not limited to, C and C++. Alternatively, an interpreted programming language is a run-time bytecode interpreted or source code interpreted programming language that operates under control of a master within a given application. Examples of interpreted programming languages include Visual Basic, Visual Basic for Applications (VBA), Visual Basic Script, Java, JavaScript, Perl, and Python. The Java programming language is included in the category of interpreted programming languages for purposes of this document even though Java is compiled from source code to produce an object and there is no access to the Java source during run time. One key reason Java is included is because the compiled Java object is fundamentally a bytecode object that requires a language engine rather than the traditional machine code link, load, and execute steps.
One example of a compiled programming language debugger limitation is that they require knowledge of the static environment from which the run-time object code was generated. The static environment of a compiled programming language includes the source code and the corresponding object code. A debugger for a compiled programming language performs the work of generating a mapping of the structures between the source code and the object code prior to executing the object being debugged, and the debugger requires that the source code and object code remain consistent throughout the debug process. Any changes to either the source code and/or the object code render the debug mapping and subsequent debugging capability unsound. For this reason, compiled programming language debuggers do not tolerate run time changes to code and the debugger for one compiled programming language is not functional for any other programming language.
Alternatively, interpreted programming languages are more flexible in that they are run-time interpreted by a programming language engine that does not require a static source code or object code environment. However, interpreted programming language debuggers do not accommodate compiled programming language debugging and are often functional with only one interpreted programming language.
Another problem with compiled programming language debuggers is that they only function under known predefined run-time conditions with a specific operating environment. However, even under these constraints existing compiled programming language debuggers are only aware of predefined host application content that is made available to the debugger prior to run time, but the debuggers have no run-time knowledge of host application content.
One solution to the difficulty with debugging applications that contain disparate code from compiled programming languages and/or interpreted programming languages is to limit the developer to using only one programming language for an application. However, this solution is undesirable because no one programming language is ideal for every application. Further, this solution is unreasonable because the demands of present day Internet web page programming, as well as the general customer/developer demands in the computing industry, require multi-language extensibility.
For these reasons, there exists an ongoing need for a debugging technology that facilitate efficient programmability by way of programming language, host application, and operating environment independence. A system of this type has heretofore not been known prior to the invention as disclosed below.
The above identified problems are solved and an advancement achieved in the field of programming language debuggers due to the active debugging environment of the present invention for applications containing compiled and interpreted programming language code. The active debugging environment facilitates content rich run-time debugging in an active debug environment even if a mixture of compiled and interpreted programming languages exist within the application being debugged. One purpose of the active debugging environment is to provide an open and efficiently deployed framework for authoring and debugging language neutral and host neutral applications.
In the context of the present discussion, language neutral means that a debugging environment exists that transparently supports multi-language program debugging and cross-language stepping and breakpoints without requiring specific knowledge of any one programming language within the environment. Host neutral, also referred to as content-centric, means that the debugging environment can be automatically used with any active scripting host such that the host application has control over the structure of the document tree presented to the debug user, including the contents and syntax of coloring of the documents being debugged. In addition, the debugging environment provides debugging services that include, but are mot limited to, concurrent host object model browsing beyond the immediate run-time scope. Host document control allows the host to present the source code being debugged in the context of the host document from which it originated. Further, the language neutral and content-centric host neutrality, facilitates a developer transparent debugging environment having multi-language extensibility, smart host document and application context management, and virtual application discoverability and dynamicness.
Discoverability means the ability for the debugging environment to be started during program run-time and immediately step into a running application with full knowledge of the executing program""s context and program execution location. Dynamicness means the concept of flexible debugging where there is no static relationship between the run-time environment at the beginning of program execution and the run-time environment at some later point in program execution. In other words, script text can dynamically be added to or removed from a running script with the debugging environment having immediate and full knowledge of the changes in real time.
Key components of the active debugging environment include, but are not limited to, a Process Debug Manager (PDM) that maintains a catalog of components within a given application, and a Machine Debug Manager (MDM) that maintains a catalog of applications within a virtual application. The active debugging environment components work cooperatively with any replaceable and/or generic debug user interface that support typical debugging environment features. The active debugging environment also cooperatively interacts with a typical active scripting application components that include, but are not limited to, at least one language engine for each programming language present in a given script, and a scripting host.
The method for debugging a multiple language application in an active debugging environment includes, but is not limited to, defining a content centric host, defining a language neutral debugging environment, generating a virtual application that includes the multiple compiled and interpretive programming language statements and related programming language context, and executing the virtual application on the content centric host under control of the language neutral active debugging environment.
Defining a content centric host includes establishing a language engine component for each unique programming language associated with the multiple compiled and/or interpreted programming language statements. In addition, the language engine component includes programming language specific mapping and debugging features. Defining the content centric host further includes coordinating in-process activities of the content centric host with each of the language engine component and the language neutral debugging environment. Defining an active debugging environment includes establishing a PDM and an MDM as the core components to facilitate debugging by way of a variety of existing language engines and debug user interfaces, and to coordinate language neutral and host neutral communications between the active debugging environment and the content centric host during debug operations.
Additional details of the present invention will be come apparent and are disclosed in the text accompanying FIGS. 1-7 as set forth below. Appendix A is included to disclose specific details of active scripting interfaces used in one example of a run-time implementation. Appendix B is included to disclose specific details of interfaces used in one example of an active debugging environment implementation.